package com.graduationproject.examonline.examPaper.controller;

import com.graduationproject.examonline.exam.service.ExamService;
import com.graduationproject.examonline.examPaper.service.ExamPaperService;
import com.graduationproject.examonline.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("api/examPaper")
public class ExamPaperController {

    @Autowired
    private ExamPaperService examPaperService;

    @PostMapping("/insertExamPaper")
    public Result insertExamPaper(@RequestBody Map<String, Object> params) {
        return examPaperService.insertExamPaper(params);
    }

    @GetMapping("/getQuestionListByExamPaperId")
    public Result getQuestionListByExamPaperId(String exam_paper_id){
        return examPaperService.getQuestionListByExamPaperId(exam_paper_id);
    }
}
